"""多重继承"""
class ProntOne:
    namea = 'ProntOne'
    def set_value(self,a):
        self.a  = a
    def set_namea(self,namea):
        self.namea = namea
    def info(self):
        print('ProntOne:%s,%s' % (ProntOne.namea,self.a))

class PrntSecond:
    nameb = 'PrntSecond'
    def set_nameb(self,nameb):
        PrntSecond.nameb = nameb
    
    def info(self):
        print('PrntSecond: %s '%(PrntSecond.nameb,))

class Sub(ProntOne,PrntSecond):
    pass

class Sub2(PrntSecond,ProntOne):
    pass

class Sub3(ProntOne,PrntSecond):
    def info(self):
        ProntOne.info(self)
        PrntSecond.info(self)

print('使用第一个子类')
sub = Sub()
sub.set_value('11111')
sub.info()
sub.set_nameb('222222')
sub.info()

print('使用第二个子类')
sub2 = Sub2()
sub2.set_value('3333333')
sub2.info()
sub2.set_nameb('44444')

print('使用第三个子类')
sub3 = Sub3()
sub3.set_value('555555')
sub3.info()
sub3.set_nameb('6666666')
sub3.info()